package cn.stylefeng.guns.modular.api.model;


import io.swagger.annotations.ApiModelProperty;

public class ModularDTO implements Comparable{

    public ModularDTO(){}

    public ModularDTO(String modelName, String core, Integer pri){
        this.modelName = modelName;
        this.core = core;
        this.pri = pri;
    }

    @ApiModelProperty("模块名")
    private String modelName;

    @ApiModelProperty("模块编码")
    private String core;

    @ApiModelProperty("排序号")
    private Integer pri;

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public String getCore() {
        return core;
    }

    public void setCore(String core) {
        this.core = core;
    }

    public Integer getPri() {
        return pri;
    }

    public void setPri(Integer pri) {
        this.pri = pri;
    }

    @Override
    public int compareTo(Object o) {
        if(o instanceof ModularDTO){
            ModularDTO emp = (ModularDTO) o;
            return this.pri.compareTo(emp.pri);
        }
        return 0;
    }
}
